package com.huyn.baseframework.model;

import java.io.Serializable;

/**
 * Created by huyaonan on 15/11/7.
 */
public class VideoItem implements Serializable {
    public String videoid;//主键
    public String videono="";
    public String videoTitle="";
    public String videoDesc="";
    public int duration;

    public String videoType="";
    public String soundSwitch="";

    public String cameraType="";
    public String updownAngle="";
    public String leftRightAngle="";

    public VideoWithDefinitionModel videoPlay;

    //vr
    public boolean isVr = false;
    public boolean isVr() {
        return "vr".equalsIgnoreCase(cameraType);
    }

    public int delayTime;
    public int index;

    public VideoItem(String title) {
        this.videoTitle =  title;
    }

    public boolean enableSound() {
        return "Y".equalsIgnoreCase(soundSwitch);
    }

    public void updateDelay(int delay) {
        this.delayTime -= delay;
    }

    public VideoPlayModel getVideo() {
        VideoPlayModel model = new VideoPlayModel();
        model.videoId = videoid;
        model.videoNo = videono;
        model.videoModel = videoPlay;
        return model;
    }

    public String getVideoId() {
        return videoid;
    }

}
